<template>
  <div class="box">
    <div class="header">
      <div>
        <van-icon name="arrow-left" size="0.6rem" @click="$router.go(-1)" />
      </div>
      <div class="header-img">
        购物车
      </div>
      <div class="icons">
        <p @click="isshow = !isshow">三</p>
        <div v-show="isshow" class="icon-">
          <div class="icon-n" @click="$router.push('/home')">
            <van-icon name="16" class-prefix="icon" />首页
          </div>
          <div class="icon-n" @click="$router.push('/cate')">
            <van-icon name="fenlei" class-prefix="icon" />分类
          </div>
          <div class="icon-n" @click="$router.push('/cart')">
            <van-icon name="24gl-cartFull9" class-prefix="icon" />购物车
          </div>
          <div class="icon-n" @click="$router.push('/user')">
            <van-icon name="shouye" class-prefix="icon" />我的
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      isshow: false
    }
  }
}
</script>

<style lang="scss" scoped>
.box {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  background-color: #fff;
  width: 100%;
  height: 1.5rem;
  display: flex;
  justify-content: center;
  .header {
    margin: 0 auto;
    height: 1.5rem;
    position: fixed;
    display: flex;
    width: 100%;
    background-color: rgb(236, 234, 234);
    justify-content: center;
    align-items: center;
    div {
      font-size: 0.4rem;
    }
    .icons {
      position: relative;
      p{
          padding-right: 0.4054rem;
      }
      .icon- {
        width: 3rem;
        height: 5rem;
        margin: 0rem 3rem;
        background-color: white;
        position: absolute;
        right: -2.8rem;
        border: 0.01rem solid #e9ecf0;
        .icon-n {
          margin: 0.6rem 0.05rem;
          .icon {
            margin-left: 0.4rem;
          }
        }
      }
    }
    .header-img {
      flex-flow: 1;
      display: flex;
      justify-content: center;
      width: 100%;
      font-size: 0.6757rem;
    }
  }
}
</style>
